#include "invert.h"
#include <boost/gil/gil_all.hpp>

using namespace boost::gil;

namespace boost {
namespace gil {
namespace extension {
namespace filters {

struct invert_pixel_color {
    invert::gray_level_t operator()(invert::gray_level_t gray_level) const {
        return channel_invert(gray_level);
    }
};

invert::invert() {

}

invert::~invert() {
}

void invert::execute(image_t& image) const {
    transform_pixels(image._view, image._view, invert_pixel_color());
}

}
}
}
}
